package com.twu.biblioteca;

/**
 * Created by kashyapk on 28/02/14.
 */
public class Movie {
    private int year;
    private int rating;
    private String name;
    private String director;

    public Movie(String name, String director, int year, int rating) {
        this.name = name;
        this.director = director;
        this.year = year;
        this.rating = rating;
    }

    public String getName() {
        return name;
    }

    @Override
    public boolean equals(Object obj) {
        Movie movie = (Movie) obj;
        if(name.equals(movie.name) &&
               director.equals(movie.director) &&
               year == movie.year &&
               rating == movie.rating )
            return true;
        return false;
    }
}
